<template>
  <div >
    <div style="margin-top:12px;text-align: center;font-size: 17px;">
      待支付金额：<span style="color: red;">{{info.price}}</span>
    </div>
    <div id="qrcode" ref="qrcode" style="width:280px;height;200px;margin-left:34%;margin-top:15px;">
    </div>
    <div style="text-align:center;margin-top:20px;font-size:18px;color: red;">请使用微信“扫一扫”扫码支付</div>
  </div>
</template>
<script>
import QRCode from 'qrcodejs2'
import { postAction, getAction,downFile } from '@/api/manage'
export default {
  name: "qrcodemodel",
  props: {
    info:{
      type:[Object],
      default: {}
    },
    url:{
      type:[String],
      default:""
    },
    param:{
      type:[String],
      default:""
    },
    paramValue:{
      type:[String],
      default:""
    },
    time:null,
  },
  data() {
    return {
      imgSrc: "",
      list: {},
    }
  },
  mounted() {
    this.init(this.info)

  },
  methods: {
    init(code){ 
    this.info = code;
    document.getElementById("qrcode").innerHTML = ""; //获取生成二维码后显示的容器的ID
    let that = this
      this.qrCode = new QRCode('qrcode',{
        width:150,                     //二维码的宽度
        height:150,                    //二维码的高度
        text:code.wxPayParams.codeUrl,            //调用weixincode()方法时后台传的code
        colorDark:'#000',              //二维码颜色
        colorLight:'#fff',             //二维码底色
    })
    },
    
  }
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>